<template>
  <div>
    <admin-form></admin-form>
    <admin-table :count="adminData.count"
                 :pageSize="adminData.pageSize"
                 :adminList="adminData.list"></admin-table>
  </div>
</template>

<script>
import adminForm from './adminForm.vue'
import adminTable from './adminTable.vue'
import { getAdmin } from '../../api/admin'
export default {
  name: 'Ljfvue2011Index',
  components: { adminForm, adminTable },
  data () {
    return {
      adminData: {}
    };
  },
  created () {
    this.getAdminList()
  },
  mounted () {

  },
  methods: {
    // 获取管理员列表接口
    async getAdminList (pageStart = 1, searchText) {
      console.log(pageStart)
      var res = await getAdmin({
        pageStart: pageStart,
        searchText: searchText
      })
      console.log(res)
      this.adminData = res.data.data;
    }
  },
};
</script>

<style lang="less" scoped>
</style>